package com.zhengdongzulin.zuke.app.main.mine

import com.lxj.androidktx.core.getVM
import com.zhengdongzulin.zuke.R
import com.zhengdongzulin.zuke.base.BaseActivity
import com.zhengdongzulin.zuke.databinding.ZkActivityAboutUsBinding
import com.zhengdongzulin.zuke.ext.loadImage


/**
 * jeff
 * 关于我们
 * 2021-03-27 17:50:47
 */
class ZKAboutUsActivity : BaseActivity<AboutUsVm, ZkActivityAboutUsBinding>() {

    override fun getLayoutResId(): Int = R.layout.zk_activity_about_us

    override fun initVM(): AboutUsVm = getVM(AboutUsVm::class.java)

    override fun initView() {
        setTitleContent("关于我们")
    }

    override fun initData() {
        mViewModel.getAboutDetail()
    }

    override fun initListener() {

    }

    override fun startObserve() {
        mViewModel.getAboutDetail.observe(this, androidx.lifecycle.Observer {
            mView.ivPic.loadImage(it.picAddress)
            mView.tvContent.text = it.content
        })
        mViewModel.getAboutDetail.state.observe(this, getObserver(mViewModel.getAboutDetail))
    }
}